package com.yc.bean1;

import org.apache.log4j.Logger;

/**
 * @author zwei
 * @create 2024-07-28 14:43
 */
public class Address {
    private String province;
    private String city;
    private String district;
    private Logger logger=Logger.getLogger(Address.class.getName());

    public Address() {
        System.out.println("Address的构造方法执行了");
    }

    @Override
    public String toString() {
        return "Address{" +
                "province='" + province + '\'' +
                ", city='" + city + '\'' +
                ", district='" + district + '\'' +
                '}';
    }

    public Address(String province, String city, String district) {
        this.province = province;
        this.city = city;
        this.district = district;
    }

    public void setProvince(String province) {
        logger.debug("setProvince执行了"+province);
        this.province = province;
    }

    public void setCity(String city) {
        logger.debug("setCity执行了"+city);
        this.city = city;
    }

    public void setDistrict(String district) {
        logger.debug("setDistrict执行了"+district);
        this.district = district;
    }

    public String getProvince() {
        return province;
    }

    public String getCity() {
        return city;
    }

    public String getDistrict() {
        return district;
    }

}
